<div th:fragment="base">
    <base th:href="${#httpServletRequest.getContextPath()+'/'}"/>
</div>